<template>
  <view>
	<cpicture ref="child"></cpicture>
  </view>
</template>

<script>
import cpicture from './components/Picture'
export default {
  name: 'Captcha',
  components: {
    cpicture
  },
  data () {
    return {
      who: ''
    }
  },
  mounted () {},
  created () {
    this.who = this.$store.state.config.captcha_type == '' ? 'picture' : this.$store.state.config.captcha_type
    this.who = 'c' + this.who
  },
  computed: {},
  methods: {
    show (callback, setShow) {
      if (this.$store.state.config.captcha_open == 1 && (setShow === undefined || setShow === true)) {
		  // this.$nextTick(()=>{
		  // 	console.log(this.$refs)
		  // })
        this.$refs.child.show(callback)
      } else {
        callback()
      }
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
